const util = {
	//提示框
	logStr:(str) => {
	    uni.showToast({
	    	title: str,
	    	icon: 'none',
	    	duration: 2600
	    });
	},
	
	//页面跳转
	jumpUrl:(url)=>{
	    uni.navigateTo({
			url: url
		});
	},
	
	//打电话
	makePhone(tel){
	    uni.makePhoneCall({
	    	phoneNumber: tel,
	    	fail(e){}
	    });
	},
	
	stringToNum(val){
	    const newVal = val ? Number(val) : null;
		return newVal
	},
	
	//获取当前时区
	getTimeZone(){
	    var offset = new Date().getTimezoneOffset();
	    var sign = offset < 0? "" : "-";
	    var hours = Math.abs(Math.floor(offset / 60));
	    return Number(sign + hours); //+ ":" + ("0" + minutes).slice(-2);
	},
}

export default util
